<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html 
     PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>Module: Karakuri</title>
  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
  <meta http-equiv="Content-Script-Type" content="text/javascript" />
  <link rel="stylesheet" href=".././rdoc-style.css" type="text/css" media="screen" />
  <script type="text/javascript">
  // <![CDATA[

  function popupCode( url ) {
    window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
  }

  function toggleCode( id ) {
    if ( document.getElementById )
      elem = document.getElementById( id );
    else if ( document.all )
      elem = eval( "document.all." + id );
    else
      return false;

    elemStyle = elem.style;
    
    if ( elemStyle.display != "block" ) {
      elemStyle.display = "block"
    } else {
      elemStyle.display = "none"
    }

    return true;
  }
  
  // Make codeblocks hidden by default
  document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
  
  // ]]>
  </script>

</head>
<body>



    <div id="classHeader">
        <table class="header-table">
        <tr class="top-aligned-row">
          <td><strong>Module</strong></td>
          <td class="class-name-in-header">Karakuri</td>
        </tr>
        <tr class="top-aligned-row">
            <td><strong>In:</strong></td>
            <td>
                <a href="../files/lib/karakuri_rb.html">
                lib/karakuri.rb
                </a>
        <br />
            </td>
        </tr>

        </table>
    </div>
  <!-- banner header -->

  <div id="bodyContent">



  <div id="contextContent">

    <div id="description">
      <p>
Some useful feature for toto and the likes. Basically, any ruby based blog
or site.
</p>

    </div>


   </div>

    <div id="method-list">
      <h3 class="section-bar">Methods</h3>

      <div class="name-list">
      <a href="#M000009">csv_to_array</a>&nbsp;&nbsp;
      <a href="#M000013">desired_articles</a>&nbsp;&nbsp;
      <a href="#M000014">desired_tag</a>&nbsp;&nbsp;
      <a href="#M000011">disqus_comment_count_js</a>&nbsp;&nbsp;
      <a href="#M000010">seo_friendly_title</a>&nbsp;&nbsp;
      <a href="#M000012">short_url_bitly</a>&nbsp;&nbsp;
      <a href="#M000008">tag_link_list</a>&nbsp;&nbsp;
      </div>
    </div>

  </div>


    <!-- if includes -->

    <div id="section">





      


    <!-- if method_list -->
    <div id="methods">
      <h3 class="section-bar">Public Class methods</h3>

      <div id="method-M000009" class="method-detail">
        <a name="M000009"></a>

        <div class="method-heading">
          <a href="Karakuri.src/M000009.html" target="Code" class="method-signature"
            onclick="popupCode('Karakuri.src/M000009.html');return false;">
          <span class="method-name">csv_to_array</span><span class="method-args">(csv_string)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
processes a csv-string into an array
</p>
        </div>
      </div>

      <div id="method-M000013" class="method-detail">
        <a name="M000013"></a>

        <div class="method-heading">
          <a href="Karakuri.src/M000013.html" target="Code" class="method-signature"
            onclick="popupCode('Karakuri.src/M000013.html');return false;">
          <span class="method-name">desired_articles</span><span class="method-args">(articles, tag)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
desired articles matching a corresponding tag
</p>
        </div>
      </div>

      <div id="method-M000014" class="method-detail">
        <a name="M000014"></a>

        <div class="method-heading">
          <a href="Karakuri.src/M000014.html" target="Code" class="method-signature"
            onclick="popupCode('Karakuri.src/M000014.html');return false;">
          <span class="method-name">desired_tag</span><span class="method-args">(query_string)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
extract desired tag from <tt>env[&quot;QUERY_STRING&quot;]</tt> or an
equally formed expression, e.g. tag=desired_tag
</p>
        </div>
      </div>

      <div id="method-M000011" class="method-detail">
        <a name="M000011"></a>

        <div class="method-heading">
          <a href="Karakuri.src/M000011.html" target="Code" class="method-signature"
            onclick="popupCode('Karakuri.src/M000011.html');return false;">
          <span class="method-name">disqus_comment_count_js</span><span class="method-args">(disqus_shortname)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Generates javascript to include to the bottom of your index page. Appending
&#8216;disqus_thread&#8217; to the end of permalinks will replace the text
of these links with the comment count.
</p>
<p>
For example, you may have a link with this HTML: <tt>&amp;lt;a
href=&amp;quot;<a
href="http://example.com/my_article.html#disqus_thread&quot;&gt;Comments&lt;/a&gt">example.com/my_article.html#disqus_thread&quot;&gt;Comments&lt;/a&gt</a>;
</tt> The comment count code will replace the text &quot;Comments&quot;
with the number of comments on the page
</p>
<p>
(see <a
href="http://disqus.com/comments/universal">disqus.com/comments/universal</a>/
for details)
</p>
        </div>
      </div>

      <div id="method-M000010" class="method-detail">
        <a name="M000010"></a>

        <div class="method-heading">
          <a href="Karakuri.src/M000010.html" target="Code" class="method-signature"
            onclick="popupCode('Karakuri.src/M000010.html');return false;">
          <span class="method-name">seo_friendly_title</span><span class="method-args">(path, title, seo_ending)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
pass the path (@path for a toto blog) &amp; the desired SEO ending, e.g.
the name of your blog. example for toto: <tt><a
href="Karakuri.html#M000010">seo_friendly_title</a>(@path, title,
&quot;mysite.com&quot;) will produce &#8216;subpage | mysite.com&#8217; as
seo friendly page title.</tt>
</p>
        </div>
      </div>

      <div id="method-M000012" class="method-detail">
        <a name="M000012"></a>

        <div class="method-heading">
          <a href="Karakuri.src/M000012.html" target="Code" class="method-signature"
            onclick="popupCode('Karakuri.src/M000012.html');return false;">
          <span class="method-name">short_url_bitly</span><span class="method-args">(url, login, api_key)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Retrieve bit.ly shortened url
</p>
        </div>
      </div>

      <div id="method-M000008" class="method-detail">
        <a name="M000008"></a>

        <div class="method-heading">
          <a href="Karakuri.src/M000008.html" target="Code" class="method-signature"
            onclick="popupCode('Karakuri.src/M000008.html');return false;">
          <span class="method-name">tag_link_list</span><span class="method-args">(csv_string)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
create a list of links to tagged articles, default link_format:
<tt>%&amp;amp;&amp;lt;a href=&amp;quot;/tagged?tag=#{tag}&amp;quot;
alt=&amp;quot;articles concerning #{tag}&amp;quot;
&amp;gt;#{tag}&amp;lt;/a&amp;gt; &amp;amp;</tt>
</p>
        </div>
      </div>


    </div>


  </div>


<div id="validator-badges">
  <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
</div>

</body>
</html>